<template>
  <div class="underwear-card-list">
    <div class="underwear-card-list-left">
      <div class="l-header">
        <div class="l-header_left">内裤卡列表</div>
      </div>
      <div class="l-content">
        <label class="l-content-card">
          <input type="radio" name="underwearCard" />
          <div>
            <div></div>
          </div>
          <div>
            <header>活动内裤卡</header>
            <section>傲雪棋身材管理中心</section>
            <section>Aoxueqi Body Management Center</section>
            <footer>售价: 88.88元</footer>
            <footer>领取次数: 3次</footer>
          </div>
        </label>
      </div>
      <div class="l-bottom">
        <div class="b-item l-bottom-total">
          <div class="t-value">5</div>
          <div class="t-label">订单金额</div>
        </div>
        <div class="b-item l-bottom-total">
          <div class="t-value">5</div>
          <div class="t-label">领取次数</div>
        </div>
        <div class="b-item l-bottom-total">
          <div class="t-value">￥999</div>
          <div class="t-label">应付金额</div>
        </div>
        <div class="b-item l-bottom-button_add">
          <!-- <span class="l-bottom-button_add--icon iconfont icon-jiahao"></span> -->
          订单记录
        </div>
      </div>
    </div>
    <div class="underwear-card-list-right">
      <div class="r-card">
        <div class="c-header">
          <div class="h-left">
            <p class="h-left--name">
              李嘉贤
              <img :src="prefixOssUrl('distributorSign.png')" alt="">
            </p> 13625843699
          </div>
          <div class="h-button" :class="{ 'h-button_active': true }">
            {{ true ? '退出会员' : '选择会员' }}
          </div>
        </div>
        <div class="c-cell">
          <span class="c-label">会员类型：</span>至尊会员
        </div>
        <div class="c-cell">
          <span class="c-label">店主：</span>刘德华/19989917998
        </div>
        <div class="c-cell">
          <span class="c-label">推荐：</span>刘德华/19989917998
        </div>
        <div class="c-cell">
          <span class="c-label">股东：</span>刘德华/19989917998
        </div>
        <div class="c-integral">
          <div class="c-integral_item">
            <p class="i-value">1099</p>
            <p class="i-label">市场积分</p>
          </div>
          <div class="c-integral_line"></div>
          <div class="c-integral_item">
            <p class="i-value">4</p>
            <p class="i-label">基础积分</p>
          </div>
        </div>
        <div class="c-wallet">
          <img class="w-img" :src="prefixOssUrl('balanceAccount.png')" alt="">
          <div class="w-content">
            <div class="w-header">
              <div class="w-header_left">至尊钱包</div>
              <div class="w-header_right">充值</div>
            </div>
            <div class="w-total">323132.12</div>
            <div class="w-footer">
              <span class="f-item">余额：231231</span>
              <span class="f-item">奖励：32213</span>
            </div>
          </div>
        </div>
      </div>
      <div class="r-cell">
        <div class="c-left">活动记录</div>
        <div class="c-right">
          <div class="r-text">查看更多</div>
          <div class="r-icon iconfont icon-youjiantou"></div>
        </div>
      </div>
      <div class="r-footer">
        <button class="r-footer_btn r-footer_btn--pay" :class="{ 'r-footer_btn--active': true }">
          <span class="b-icon iconfont icon-qiandai"></span>
          结账
        </button>
      </div>
    </div>
  </div>
  <underwear-orders></underwear-orders>
</template>

<script setup>
import underwearOrders from "./orders.vue"
import {
  ref,
  provide,
  inject
} from 'vue';


const {
  prefixOssUrl
} = inject('globalMethods');


</script>

<style lang="less">
.underwear-card-list {
  display: flex;
  width: 100%;
  height: 100%;
  background: #ececec;

  &-left {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #E5E5E5;

    .l-header {
      display: flex;
      justify-content: space-between;
      height: 74px;
      font-size: 26px;
      font-weight: 500;
      color: #2E323D;
      background: #fff;
      border-bottom: 1px solid #ccc;

      &_left {
        height: 74px;
        padding-left: 30px;
        line-height: 74px;
        color: #4A5060;
      }
    }

    .l-bottom {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      height: 128px;
      margin-top: 5px;
      background: #FFF;

      .b-item {
        margin-right: 46px;
      }

      &-total {
        position: relative;
        margin-right: 30px;
        font-size: 30px;
        text-align: right;

        .t-value {
          height: 32px;
          color: #1981F4;

          &--del {
            position: absolute;
            top: -20px;
            right: 0;
            font-size: 20px;
            font-weight: 500;
            color: #999;
            text-decoration: line-through;
          }
        }

        .t-label {
          font-size: 28px;
          color: #4A5060;
        }
      }

      &-button_add {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 220px;
        height: 88px;
        font-size: 28px;
        font-weight: 500;
        color: #FFF;
        text-align: center;
        line-height: 88px;
        background: #FE9900;
        border-radius: 5px;

        &--icon {
          padding-top: 5px;
          margin-right: 10px;
          font-size: 38px;
        }

      }
    }

  }

  .l-content {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, 262px);
    grid-auto-rows: 248px;
    grid-gap: 20px 20px;
    padding: 30px 30px 0;
    background: #fff;
    box-sizing: border-box;

    * {
      line-height: 1;
    }

    &-card {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      border-radius: 10px;
      background-color: #999;

      >input {
        display: block;
        width: 0;
        height: 0;
        opacity: 0;
      }

      >input+div {
        position: absolute;
        top: 0;
        left: 0;
        height: 0;
        width: 100%;
        height: 100%;

        >div {
          visibility: hidden;
          position: absolute;
          top: 0;
          right: 0;
          width: 40px;
          height: 40px;
        }
      }

      >input:checked+div {
        border-radius: 10px;
        box-shadow: 0 0 0 1px #1981F4, 0 0 16px 0 rgba(0, 0, 0, 0.2);

        >div {
          visibility: visible;
          // background-color: #1981F4;
          background-image: repeating-linear-gradient(45deg, transparent 0, transparent 50%, #1981F4 50%, #1981F4 100%);
          border-radius: 0 10px 0 0;
        }
      }

      >div:last-child {
        display: flex;
        align-items: center;
        flex-direction: column;
        width: 222px;
        height: 208px;
        background: #FFFFFF;
        border-radius: 10px;

        >header {
          margin: 18px 0 10px;
          font-size: 26px;
          font-weight: bold;
          font-style: italic;
          color: #2E323D;
        }

        >section {
          font-size: 18px;
          color: #666;
        }

        >section:nth-child(3) {
          margin: 3px 0 23px;
          font-size: 12px;
        }

        >footer {
          width: 180px;
          height: 38px;
          font-size: 22px;
          font-weight: bold;
          color: #1981F4;
          background: rgb(234, 237, 242, .7);
          border-radius: 19px;
          text-align: center;
          line-height: 38px;
        }

        >footer:last-child {
          margin-top: 10px;
        }
      }

    }
  }

  &-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 10px;
    width: 670px;
    background: #FFF;

    .r-card {
      width: 570px;
      padding: 20px;
      margin-top: 20px;
      background: #6D6E83;
      border-radius: 5px;

      .c-header {
        display: flex;
        justify-content: space-between;

        .h-left {
          display: flex;
          align-items: center;
          font-size: 30px;
          font-weight: bold;
          color: #FFF;
          text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.4);

          &--name {
            position: relative;
            margin-right: 20px;

            >img {
              position: absolute;
              top: -12px;
              right: -15px;
              width: 30px;
              height: 30px;
            }
          }

        }

        .h-button {
          width: 108px;
          height: 44px;
          font-size: 20px;
          font-weight: 400;
          color: #FFF;
          text-align: center;
          line-height: 44px;
          background: #1ABD69;
          box-shadow: 0px 4px 12px 0px rgba(60, 60, 60, 0.3);
          border-radius: 5px;

          &_active {
            background: #FE9900;
          }
        }
      }

      .c-cell {
        display: flex;
        align-items: center;
        margin-bottom: 5px;
        font-size: 24px;
        color: #FFF;

        .c-label {
          font-size: 22px;
          font-weight: 500;
          color: #DDDEE2;
        }

      }

      .c-integral {
        display: flex;
        align-items: center;
        height: 98px;
        margin: 20px 0;
        border-top: 1px solid #808196;
        border-bottom: 1px solid #808196;

        &_line {
          width: 1px;
          height: 64px;
          background: #808196;
        }

        &_item {
          flex: 1;
          text-align: center;

          .i-value {
            margin-bottom: 10px;
            font-size: 28px;
            font-weight: 600;
            color: #FFF;
            line-height: 18px;
          }

          .i-label {
            font-size: 24px;
            font-weight: 500;
            color: #DDDEE2;
          }
        }
      }

      .c-wallet {
        position: relative;
        width: 530px;
        height: 124px;
        padding: 20px;

        .w-img {
          position: absolute;
          left: 0;
          top: 0;
          width: 570px;
          height: 164px;
        }

        .w-content {
          position: absolute;
          z-index: 9;
          width: 530px;
          height: 124px;

          .w-header {
            display: flex;
            justify-content: space-between;

            &_left {
              font-size: 26px;
            }

            &_right {
              width: 68px;
              height: 44px;
              font-size: 24px;
              color: #FFF;
              text-align: center;
              line-height: 44px;
              background: #13BE75;
              border-radius: 5px;
            }
          }

          .w-total {
            font-size: 32px;
            font-weight: bold;
            color: #4A5060;
          }

          .w-footer {
            font-size: 24px;
            font-weight: 500;
            color: #4A5060;
          }
        }

      }
    }

    .r-cell {
      display: flex;
      justify-content: space-between;
      width: 570px;
      height: 74px;
      margin-top: 20px;
      font-size: 26px;
      line-height: 74px;
      border-top: 1px solid #ccc;
      border-bottom: 1px solid #ccc;

      .c-left {
        font-weight: 500;
        color: #2E323D;
      }

      .c-right {
        display: flex;
        align-items: center;
        font-weight: 400;
        color: #999;

        .r-text {}

        .r-icon {
          font-size: 36px;
        }
      }
    }

    .r-footer {
      position: fixed;
      bottom: 20px;
      display: flex;
      align-items: center;
      font-size: 30px;
      font-weight: 400;

      &_btn {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 88px;
        color: #FFF;
        background: #1981F4;
        border-radius: 5px;
        opacity: 0.5;

        .b-icon {
          margin-right: 10px;
          font-size: 38px;
        }

        &--pay {
          width: 610px;
        }

        &--active {
          opacity: 1;
        }
      }
    }
  }
}
</style>